package {
	import flash.text.TextField;	
	import flash.display.Sprite;
	
	public class Loading extends Sprite {
		
		public function Loading(width:Number, height:Number, backgroundColor:uint, text:String, textColor:uint) {
			//this function is going to be the preloader for your thumb images it currently has
			//  the width height BG color and text set in Gallery when we create it
			//create the square
			this.graphics.beginFill(backgroundColor);
			this.graphics.drawRect(0, 0, width, height);
			this.graphics.endFill();
			//create the text field
			var label:TextField = new TextField();
			label.text = text;
			label.textColor = textColor;
			label.width = width;
			//center the text field horrizontally
			label.y = (height / 2) - (label.textHeight / 2);
			//add the text field
			addChild(label);
		}
	}
}
